* Analysis of Presidential Approval Data *

use "kriner_schickler_ch3_replication_approval.dta"

* Table 3.2 -- all years *
reg3 (approval misconductdays icst1 positive negative vcaslast6 iraqcaslast6 honeymoon approvalt1  ike-wbush) (  misconductdays approval  alldaysinsession positive negative  vcaslast6 iraqcaslast6 honeymoon  ike-wbush) 
outreg2 using ch3table3.2, word drop(ike-wbush ) label dec(2) onecol  replace

* Table 3.3 -- House vs. Senate *
reg3 (approval hmisconductdays icst1 positive negative vcaslast6 iraqcaslast6 honeymoon approvalt1  ike-wbush) (  hmisconductdays approval  hdaysinsession positive negative  vcaslast6 iraqcaslast6 honeymoon  ike-wbush)
outreg2 using ch3table3.3, word drop(ike-wbush ) label dec(2) onecol  append
reg3 (approval smisconductdays icst1 positive negative vcaslast6 iraqcaslast6 honeymoon approvalt1  ike-wbush) (  smisconductdays approval  sdaysinsession positive negative  vcaslast6 iraqcaslast6 honeymoon  ike-wbush)
outreg2 using ch3table3.3, word drop(ike-wbush ) label dec(2) onecol  append

* Table 3.4 -- DG vs. UG *
reg3 (approval misconductdays icst1 positive negative vcaslast6 iraqcaslast6 honeymoon approvalt1  ike-wbush) (  misconductdays approval  alldaysinsession positive negative  vcaslast6 iraqcaslast6 honeymoon  ike-wbush) if dg == 1
outreg2 using ch3table3.4, word drop(ike-wbush ) label dec(2) onecol  replace
reg3 (approval misconductdays icst1 positive negative vcaslast6 iraqcaslast6 honeymoon approvalt1  ike-wbush) (  misconductdays approval  alldaysinsession positive negative  vcaslast6 iraqcaslast6 honeymoon  ike-wbush) if dg == 0
outreg2 using ch3table3.4, word drop(ike-wbush ) label dec(2) onecol  append

* Table 3.5 -- Pre/post Watergate *
reg3 (approval misconductdays icst1 positive negative vcaslast6 iraqcaslast6 honeymoon approvalt1  ike-wbush) (  misconductdays approval  alldaysinsession positive negative  vcaslast6 iraqcaslast6 honeymoon  ike-wbush) if year < 1974
outreg2 using ch3table3.5, word drop(ike-wbush ) label dec(2) onecol  replace
reg3 (approval misconductdays icst1 positive negative vcaslast6 iraqcaslast6 honeymoon approvalt1  ike-wbush) (  misconductdays approval  alldaysinsession positive negative  vcaslast6 iraqcaslast6 honeymoon  ike-wbush) if  year > 1973
outreg2 using ch3table3.5, word drop(ike-wbush ) label dec(2) onecol  append

* Table 3.7 -- investigations vs. oversight *
reg3 (approval misconductdays oversightdays icst1 positive negative vcaslast6 iraqcaslast6 honeymoon approvalt1  ike-wbush) (  misconductdays oversightdays approval  alldaysinsession positive negative  vcaslast6 iraqcaslast6 honeymoon  ike-wbush) 
outreg2 using ch3table3.7, word drop(ike-wbush ) label dec(2) onecol  replace

* Appendix Table 3.3 -- fractionally differenced *
reg3 (fdapp misconductdays icst1 positive negative vcaslast6 iraqcaslast6 honeymoon fdappt1  ike-wbush) (  misconductdays fdapp  alldaysinsession positive negative  vcaslast6 iraqcaslast6 honeymoon  ike-wbush) 
outreg2 using ch3appendix3.3, word drop(ike-wbush ) label dec(2) onecol  replace
reg3 (fdapp misconductdays icst1 positive negative vcaslast6 iraqcaslast6 honeymoon fdappt1  ike-wbush) (  misconductdays fdapp  alldaysinsession positive negative  vcaslast6 iraqcaslast6 honeymoon  ike-wbush) if dg == 1 
outreg2 using ch3appendix3.3, word drop(ike-wbush ) label dec(2) onecol  append
reg3 (fdapp misconductdays icst1 positive negative vcaslast6 iraqcaslast6 honeymoon fdappt1  ike-wbush) (  misconductdays fdapp  alldaysinsession positive negative  vcaslast6 iraqcaslast6 honeymoon  ike-wbush) if dg == 0
outreg2 using ch3appendix3.3, word drop(ike-wbush ) label dec(2) onecol  append
reg3 (fdapp misconductdays icst1 positive negative vcaslast6 iraqcaslast6 honeymoon fdappt1  ike-wbush) (  misconductdays fdapp  alldaysinsession positive negative  vcaslast6 iraqcaslast6 honeymoon  ike-wbush) if year < 1974
outreg2 using ch3appendix3.3, word drop(ike-wbush ) label dec(2) onecol  append
reg3 (fdapp misconductdays icst1 positive negative vcaslast6 iraqcaslast6 honeymoon fdappt1  ike-wbush) (  misconductdays fdapp  alldaysinsession positive negative  vcaslast6 iraqcaslast6 honeymoon  ike-wbush) if year > 1973
outreg2 using ch3appendix3.3, word drop(ike-wbush ) label dec(2) onecol  append

* Appendix Table 3.4 -- fractionally differenced; House vs. Senate *
reg3 (fdapp hmisconductdays icst1 positive negative vcaslast6 iraqcaslast6 honeymoon fdappt1  ike-wbush) (  hmisconductdays fdapp  alldaysinsession positive negative  vcaslast6 iraqcaslast6 honeymoon  ike-wbush) 
outreg2 using ch3appendix3.4, word drop(ike-wbush ) label dec(2) onecol  replace
reg3 (fdapp smisconductdays icst1 positive negative vcaslast6 iraqcaslast6 honeymoon fdappt1  ike-wbush) (  smisconductdays fdapp  alldaysinsession positive negative  vcaslast6 iraqcaslast6 honeymoon  ike-wbush) 
outreg2 using ch3appendix3.4, word drop(ike-wbush ) label dec(2) onecol  append

* Appendix Table 3.5 -- change in approval *

reg3 (dapp misconductdays icst1 positive negative vcaslast6 iraqcaslast6 honeymoon approvalt1  ike-wbush) (  misconductdays dapp approvalt1  alldaysinsession positive negative  vcaslast6 iraqcaslast6 honeymoon  ike-wbush) 
outreg2 using ch3appendix3.5, word drop(ike-wbush ) label dec(2) onecol  replace
reg3 (dapp misconductdays icst1 positive negative vcaslast6 iraqcaslast6 honeymoon approvalt1  ike-wbush) (  misconductdays dapp approvalt1  alldaysinsession positive negative  vcaslast6 iraqcaslast6 honeymoon  ike-wbush) if dg == 1 
outreg2 using ch3appendix3.5, word drop(ike-wbush ) label dec(2) onecol  append
reg3 (dapp misconductdays icst1 positive negative vcaslast6 iraqcaslast6 honeymoon approvalt1  ike-wbush) (  misconductdays dapp approvalt1  alldaysinsession positive negative  vcaslast6 iraqcaslast6 honeymoon  ike-wbush) if dg == 0
outreg2 using ch3appendix3.5, word drop(ike-wbush ) label dec(2) onecol  append
reg3 (dapp misconductdays icst1 positive negative vcaslast6 iraqcaslast6 honeymoon approvalt1  ike-wbush) (  misconductdays dapp approvalt1  alldaysinsession positive negative  vcaslast6 iraqcaslast6 honeymoon  ike-wbush) if year < 1974
outreg2 using ch3appendix3.5, word drop(ike-wbush ) label dec(2) onecol  append
reg3 (dapp misconductdays icst1 positive negative vcaslast6 iraqcaslast6 honeymoon approvalt1  ike-wbush) (  misconductdays dapp approvalt1  alldaysinsession positive negative  vcaslast6 iraqcaslast6 honeymoon  ike-wbush) if year > 1973
outreg2 using ch3appendix3.5, word drop(ike-wbush ) label dec(2) onecol  append

* Appendix Table 3.6 *
reg3 (dapp hmisconductdays icst1 positive negative vcaslast6 iraqcaslast6 honeymoon approvalt1  ike-wbush) (  hmisconductdays dapp approvalt1  alldaysinsession positive negative  vcaslast6 iraqcaslast6 honeymoon  ike-wbush) 
outreg2 using ch3appendix3.6, word drop(ike-wbush ) label dec(2) onecol  replace
reg3 (dapp smisconductdays icst1 positive negative vcaslast6 iraqcaslast6 honeymoon approvalt1  ike-wbush) (  smisconductdays dapp approvalt1  alldaysinsession positive negative  vcaslast6 iraqcaslast6 honeymoon  ike-wbush) 
outreg2 using ch3appendix3.6, word drop(ike-wbush ) label dec(2) onecol  append

* Analysis of Experimental Data *
use "kriner_schickler_ch3_replication_CCES.dta"

* Table 3.1 *
ttest suppinvestbin if control == 1 | obama == 1, by(obama)
ttest suppinvestbin if control == 1 | bush == 1, by(bush)
ttest suppinvestbin if bush == 1 | obama == 1, by(obama)

ttest suppinvestbin if control == 1 & dem5 ==1 | obama == 1 & dem5 ==1 , by(obama)
ttest suppinvestbin if control == 1 & dem5 ==1 | bush == 1 & dem5 ==1 , by(bush)
ttest suppinvestbin if bush == 1 & dem5 ==1 | obama == 1 & dem5 ==1, by(obama)

ttest suppinvestbin if control == 1 & dem5 == 0 | obama == 1 & dem5 == 0 , by(obama)
ttest suppinvestbin if control == 1 & dem5 == 0 | bush == 1 & dem5 == 0 , by(bush)
ttest suppinvestbin if bush == 1 & dem5 == 0 | obama == 1 & dem5 == 0, by(obama)

* Appendix Table 3.1 *
ologit suppinvest obama bush gop5 dem5 male education age white
ologit suppinvest obama obamaxdem5 bush bushxdem5 gop5 dem5 male education age white


use "kriner_schickler_ch3_replication_EPA.dta" 

* Table 3.6 *
ologit epa epademinvest epagopinvest epaothinvest dem3 gop3 male age white education, robust

* Appendix Table 3.7 *
ologit epa epademinvestxdem epademinvestxgop epademinvestxind  epagopinvestxdem epagopinvestxgop epagopinvestxind epaothinvestxdem epaothinvestxgop epaothinvestxind dem3 gop3 male age white education, robust

use "kriner_schickler_ch3_replication_Libya.dta" 

* Table 3.8 *
ologit libyaapp libdemabuse libdempolicycrit libgopabuse libgoppolicycrit libothabuse dem3 gop3  male age white education, robust
